package cn.dt70.dao.aqbInterest;

import cn.dt70.pojo.AqbInterest;
import cn.dt70.pojo.AqbInterestandcode;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AqbInterestMapper {

    //兑换加息卷之后给用户添加加息卷
    int addInterest(@Param("uid") Integer uid,
                        @Param("itc") AqbInterestandcode itc) throws Exception;

    //查询用户所有加息劵的方法
    List<AqbInterest> getAllByUid(@Param("uid") Integer uid,
                                  @Param("status")Integer status,
                                  @Param("bigin")int bigin,
                                  @Param("end")int end) throws Exception;

    //获取用户的总加息卷数量
    int getNumber(@Param("uid") Integer uid,
                  @Param("status")Integer status) throws Exception;

    //修改用户加息卷状态
    int changeStatus(@Param("uid") Integer uid,
                     @Param("valueId") Integer valueId,
                     @Param("status")Integer status) throws Exception;
}
